package com.simple.piger.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * CMS【用户信息模块】用户申请记录
 * @Author  donghj
 * @Date    2017/12/19 16:46
 */
@Data
public class CmsUserApplyRecord extends Model<CmsUserApplyRecord> {
    /**
     * 申请单号
     */
    @TableId(type = IdType.INPUT)
    private String id;
    /**
     * 手机号
     */
    private String mobile;
    /**
     * 注册时间
     */
    @TableField("date_created")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date dateCreated;
    /**
     * 是否冻结
     */
    private Boolean disable;
    /**
     * 注册IP
     */
    @TableField(value = "register_ip", exist = false)
    private String registerIp;
    /**
     * 推荐人ID
     */
    @TableField(value = "referrer_id", exist = false)
    private String referrerId;
    /**
     * 推荐人手机号
     */
    @TableField(value = "referrer_mobile", exist = false)
    private String referrerMobile;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}